import {post,get} from '../../http/axios'

export default{
    namespaced:true,
    state:{
        hos:{}
    },
    mutations:{
        set_hos(state,val){
            state.hos = val;
        }
    },
    actions:{
        async findHos({commit},params) {
            let res = await get('/hospital/pageQuery',params);
            // console.log(res);
            commit('set_hos',res.data);
            return res
        },
        async saveHos({commit},params) {//第二个参数是传递过来的
            let res = await post('/hospital/saveOrUpdate',params);
            return res
        },
        async delHos({commit},params) {
            let res = await get('/hospital/deleteById',params);
            return res
        },
    }
}